import request from '@/utils/request'

export function getBlogList(params) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/front/listBlog',
    method: 'post',
    data: params
  })
}

export function getContent(uid) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/front/blog/getContent/'+uid,
    method: 'get'
  })
}

export function deleteBlog(params) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/front/blog/delete',
    method: 'post',
    data: params
  })
}

export function deleteBatchBlog(params) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/front/blog/delete',
    method: 'post',
    data: params
  })
}

export function addBlog(params) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/front/blog/add',
    method: 'post',
    data: params
  })
}

export function editBlog(params) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/front/blog/update',
    method: 'post',
    data: params
  })
}

export function getRecommendList(params) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/blog/getRecommendList',
    method: 'post',
    data: params
  })
}

export function editBatchBlog(params) {
  return request({
    url: process.env.VUE_APP_ADMIN_API + '/blog/editBatch',
    method: 'post',
    data: params
  })
}
